﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Doves.DataAccessLayer;
using Doves.Utilities;

namespace Doves.BussinessLayer
{
    public class LinkBO : BaseBO
    {
        public IEnumerable<Link> GetAllLink()
        {
            return _dao.Link.GetAllLink();
        }
        public Link GetLinkById(int Id)
        {
            return _dao.Link.GetLinkById(Id);
        }
        public bool UpdateLink(Link inLink)
        {
            return _dao.Link.UpdateLink(inLink);
        }
        public bool InsertLink(Link inLink)
        {
            return _dao.Link.InsertLink(inLink);
        }
        public bool IsExists(Link inLink)
        {
            return _dao.Link.IsExists(inLink);
        }
        public ReturnValue<bool> DelLink(int inId)
        {
            return _dao.Link.DelLink(inId);
        }
        public ReturnValue<bool> DelLink(Link inLink)
        {
            return _dao.Link.DelLink(inLink);
        }

        public ReturnValue<bool> IsHaveLinkNeedCrawle()
        {
            return _dao.Link.IsHaveLinkNeedCrawle();
        }
        public IEnumerable<Link> GetLinkToCrawle(int inNumOfRecord = Utilities.Constants.NUM_LINK_EACH_QUERY)
        {
            return _dao.Link.GetLinkToCrawle(inNumOfRecord);
        }
    }
}
